#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>
#include <math.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Rectangle)
{     
    TEST(The area should be 7.57 when input width is 2.412 and height is 3.145)
    {
      Rectangle rect(2.412, 3.145);
      ASSERT_EQ(7.57, rect.getArea());
    }

    TEST(The perimeter should be 11.1 when input width is 2.412 and height is 3.145)
    {
      Rectangle rect(2.412, 3.145);
      ASSERT_EQ(11.1, rect.getPerimeter());
    }
    
    TEST(The rectangle Perimeter should be 16.54 when width is set as 5.136 and height is -13.645)
    {
      Rectangle rect(2.412, 3.145);
      rect.setWidth(5.136);
      rect.setHeight(-13.645);      
      ASSERT_EQ(16.54, rect.getPerimeter());
    }
    TEST(The rectangle area should be 16.11 when width is set as 5.136 and height is -13.645)
    {
      Rectangle rect(2.412, 3.145);
      rect.setWidth(5.136);
      rect.setHeight(-13.645);      
      ASSERT_EQ(16.11, rect.getArea());
    }    
};

